package com.xboard.server.interceptor;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.servlet.handler.HandlerInterceptorAdapter;

public class SiteVariableHandlerInterceptor extends HandlerInterceptorAdapter {
	@Value("#{config['IMAGE_SERVER_DOMAIN']}") 
    public String imageServerDomain;
	
	@Override
    public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object object) throws Exception {
		
		
	    
		request.setAttribute("imageServer", imageServerDomain);
		
        return super.preHandle(request, response, object);
    } 
	
	@Override
    public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object object, Exception exception) throws Exception {
    }


}
